/*
 * @(#)xin.tianhui.cloud.weblog.manager.impl
 * @(#)ChannelMngImpl.java	2018-04-06
 * 
 * Copyright © 2018-2027, All rights reserved.
 * homeanter
 */
package xin.tianhui.cloud.weblog.manager.impl;


import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import xin.tianhui.cloud.weblog.core.model.dto.PagingDTO;
import xin.tianhui.cloud.weblog.core.model.vo.PagingVO;
import xin.tianhui.cloud.weblog.manager.IChannelMng;
import xin.tianhui.cloud.weblog.model.dto.ChannelResultDTO;
import xin.tianhui.cloud.weblog.model.dto.ChannelQueryDTO;
import xin.tianhui.cloud.weblog.service.IChannelService;

/**
 * <P>Description:栏目业务处理</P>
 * @ClassName: ChannelMngImpl
 * @author junchen homeanter@163.com  
 * @date 2018-04-06 10:43:03
 */
@Component
public class ChannelMngImpl implements IChannelMng{
	
	@Autowired
	private IChannelService channelService;
	
	@Override
	public ChannelResultDTO getChannelByPath(String path) {
		if(StringUtils.isNotBlank(path)) {
			return channelService.getChannelByPath(path);
		}
		return null;
	}

	@Override
	public ChannelResultDTO getChannelByBid(Integer bid) {
		return channelService.getChannelById(bid);
	}

	@Override
	public PagingVO<ChannelResultDTO> channelPaging(PagingDTO paging, ChannelQueryDTO channelQuery) {
		return channelService.channelPaging(paging,channelQuery);
	}

	@Override
	public List<ChannelResultDTO> channelchildren(Integer parentId) {
		return channelService.channelchildren(parentId);
	}

	@Override
	public List<ChannelResultDTO> channelList() {
		return channelService.getChannelList();
	}

}
